package com.jp.knowledge.my.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 竟币收支记录
 *
 * @author gzejia 978862664@qq.com
 */
public class VieCoinHistoryModel implements Parcelable {

    // 消费对象
    private String mContent;

    // 额度
    private int mNumber;

    // 类型：0_支出/1_收入
    private int mType;

    // 消费次数
    private int mTimes;

    // 计量单位
    private String mUnit;

    public String getUnit() {
        return mUnit;
    }

    public void setUnit(String unit) {
        mUnit = unit;
    }

    public int getType() {
        return mType;
    }

    public void setType(int type) {
        mType = type;
    }

    public String getContent() {
        return mContent;
    }

    public void setContent(String content) {
        mContent = content;
    }

    public int getNumber() {
        return mNumber;
    }

    public void setNumber(int number) {
        mNumber = number;
    }

    public int getTimes() {
        return mTimes;
    }

    public void setTimes(int times) {
        mTimes = times;
    }

    public VieCoinHistoryModel() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.mContent);
        dest.writeInt(this.mNumber);
        dest.writeInt(this.mType);
        dest.writeInt(this.mTimes);
        dest.writeString(this.mUnit);
    }

    protected VieCoinHistoryModel(Parcel in) {
        this.mContent = in.readString();
        this.mNumber = in.readInt();
        this.mType = in.readInt();
        this.mTimes = in.readInt();
        this.mUnit = in.readString();
    }

    public static final Creator<VieCoinHistoryModel> CREATOR = new Creator<VieCoinHistoryModel>() {
        @Override
        public VieCoinHistoryModel createFromParcel(Parcel source) {
            return new VieCoinHistoryModel(source);
        }

        @Override
        public VieCoinHistoryModel[] newArray(int size) {
            return new VieCoinHistoryModel[size];
        }
    };
}
